package com.example.demo.utils.DB;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class JdbcSQL {
    @Resource
    private JdbcTemplate jdbcTemplate;
    public void testConnection(){
        String sql="select current_date from dual";
        System.out.println(jdbcTemplate.queryForObject(sql,String.class));
    }
}
